package Test;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class ConnectTest {
	public static void main(String[] args) throws IOException {
//		URL url = new URL("http://localhost:8080/Search/baidu?key=h" );
//		URLConnection con = url.openConnection();
//		HttpURLConnection hcon = (HttpURLConnection) con;
//		hcon.setRequestMethod("GET");
//		int len= hcon.getContentLength();
//		byte[] b = new byte[2048];
//		InputStream in = hcon.getInputStream();
//		in.read(b);
//		hcon.disconnect();
//		System.out.println(new String(b));
		System.out.println(java.net.URLDecoder.decode("%E4%B8%AD","utf-8"));
		
	}
}
